const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 8081,
    // proxy: {
    //   '/api': {
    //     target: 'http://localhost:8080',
    //     changeOrigin: true,
    //   },
    // },
    host: "127.0.0.1",//vue网页访问的地址
    https: false,
    open: false,
    proxy: {
      '/api': { //为用于替换的的标识字符串
        target: 'http://localhost:8080/',//Axios跨域请求的IP
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': ''
        }
      },
    }

  },
})

